import * as types from './mutation-types'

export default {
  addToCart ({commit}, product) {
    if (product.inventory > 0) {
      commit(types.ADD_TO_CART, product.id)
    }
  }
}
